import java.io.*;

class FileInputStreamTest {
    public static void main(String [] args) {
        try {
            FileInputStream fis = new FileInputStream("myFile.txt");
            while(fis.available() > 0) {
                System.out.println(fis.read() + " ");
            }
            fis.close();
            System.out.println();

        } catch (FileNotFoundException e) {
            System.out.println("FileNotFoundException e:" + e.toString());
        } catch(EOFException e) {
            System.out.println("EOFException e:" + e.toString());
        } catch(IOException e) {
            System.out.println("IOException e:" + e.toString());
        }
    }
}
